(+), infix ⊎
ErrorsCollection

(+), infix ⊎

Synthesised documentation from language/setbagmix language/operators

From language/setbagmix

See Original text in context

Returns the Baggy addition of its arguments. More information.

From language/operators

See Original text in context

multi sub infix:<(+)>(**@p)

Baggy addition operator.

Returns the Baggy addition of its arguments. This creates a new Bag from each element of the arguments with the weights of the element added together to get the new weight, if none of the arguments are a Mix or MixHash.

say <a a b c a d> (+) <a a b c c># OUTPUT: «Bag(a(5) b(2) c(3) d)␤» 

If any of the arguments is a Mixy, the result is a new Mix.

say <a b c> (+) (=> 2.5=> 3.14).Mix# OUTPUT: «Mix(a(3.5) b(4.14) c)␤»